package com.rhino.xchat.http.response

import com.rhino.xchat.http.ErrorCode
import java.io.Serializable

/**
 * @author LuoLin
 * @since Create on 2025/4/1.
 */
open class BaseResponse : Serializable {

    var result: String? = null
    var resultNote: String? = null

    fun getMessage(): String {
        return resultNote.takeIf { !it.isNullOrEmpty() } ?: "unknown"
    }

    fun isSuccess(): Boolean {
        return result == ErrorCode.CODE_0000.code
    }
}